<%@ Page Language="C#" MasterPageFile="app-frame.master" EnableEventValidation="false" AutoEventWireup="true" CodeFile="PageWizard.aspx.cs" Inherits="app_frame_Default2" Title="PageWizard" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>	
 
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">

    <%--<script language="javascript" src="scripts/commonscript.js" type="text/javascript"></script>--%>
    <!--Added By Dhanapal on Dec 7 2010-->  
    
    <script language="javascript" src="scripts/Jquery/jquery-ui.min.js" type="text/javascript">
    </script>
    <script language="javascript" src="scripts/Jquery/autocomplete.js" type="text/javascript">
    </script>
    <!--End Of Script By Dhanapal-->
    
    <script language="javascript" src="scripts/pagewizard.js" type="text/javascript"></script>
    
<div style="z-index: 1">
<div><asp:Label ID="lblMessages" runat="server" EnableViewState="False"></asp:Label></div>
        <asp:Wizard ID="pagewizard" runat="server" ActiveStepIndex="0" Width="99%" DisplayCancelButton="True" OnFinishButtonClick="pagewizard_FinishButtonClick" OnNextButtonClick="pagewizard_NextButtonClick" OnPreviousButtonClick="pagewizard_PreviousButtonClick" HeaderText="Page Wizard - Add" OnCancelButtonClick="pagewizard_CancelButtonClick" CellPadding="5" HeaderStyle-HorizontalAlign ="Left">
         <SideBarStyle Width="150px"
                Wrap="False" />
            <WizardSteps>
                <asp:WizardStep ID="step1" runat="server" Title="Step1">
                    <table id="Table13" style="width: 754px">
                        <tr>
                            <td colspan="1" style="height: 20px">
                                <asp:Label ID="Label1" runat="server" Font-Bold="True" CssClass='defaultFont' Font-Size="10pt"
                                    Text="Page creation wizard - Step 1"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label15" runat="server" BorderStyle="None"
                                    Height="22px" Text="Page Id" Width="118px" Visible="False" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtpsid" runat="server" CssClass='defaultFont' Font-Size="8pt" BorderStyle="None" MaxLength="47" Visible="False"></asp:TextBox>
                                <asp:HiddenField ID="ps_rowkey" runat="server" /><asp:HiddenField ID="pg_rowkey" runat="server" />
                                <asp:HiddenField ID="obj_rowkey" runat="server" /><asp:HiddenField ID="ps_id" runat="server" />
                                <asp:HiddenField ID="pg_id" runat="server" />
                                <asp:HiddenField ID="obj_id" runat="server" />
                                <asp:HiddenField ID="obj_bu_id" runat="server" />
                                <asp:HiddenField ID="owner_id" runat="server" OnValueChanged="owner_id_ValueChanged" />
                                <asp:HiddenField ID="ps_mode_rowkey" runat="server" />
                                <asp:HiddenField ID="ps_mode_category_rowkey" runat="server" />
                                <asp:HiddenField ID="ps_mode_datasheet_rowkey" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label8" runat="server" BorderStyle="None"
                                    Height="21px" Text="Page Name" Width="128px" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtpsname" runat="server" CssClass='defaultFont' Font-Size="8pt" Width="150px" MaxLength="50"></asp:TextBox>
                                <asp:Label ID="lbl_pageid" runat="server" EnableViewState="False" CssClass='defaultFont' Font-Size="8pt" ForeColor="Red"></asp:Label>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtpsname" ErrorMessage="Please enter Page Name!" CssClass='defaultFont' Font-Size="8pt" Width="123px"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1" valign="top">
                                <asp:Label ID="Label3" runat="server" BorderStyle="None"
                                    Height="21px" Text="Page Description" Width="128px" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:TextBox ID="txt_page_tooltip" runat="server" CssClass='defaultFont' Font-Size="8pt"
                                    Width="300px" Rows="4" TextMode="MultiLine" ToolTip="Page Description - this will shown as tooltip in a Page"></asp:TextBox>
                                </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="Label9" runat="server" Text="Choose Page Template"
                                    Width="140px" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:DropDownList ID="ddtemp" runat="server" CssClass='defaultFont' Font-Size="8pt">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="Label4" runat="server" Text="Choose Page Icon"
                                    Width="140px" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1" valign="bottom" style="height:24px;">
                                <asp:DropDownList ID="ddpageicon" runat="server" CssClass='defaultFont' Font-Size="8pt">
                                </asp:DropDownList>
                                <img id= "ImgIcon" runat="server" alt="PageIcon" />
                                <script language ="javascript" type="text/javascript">showpageicon();</script>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="lbl_tabs" runat="server" CssClass="controlLabelFont" Text="Show Sections as Tabs"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:CheckBox ID="chk_sections_as_tabs" runat="server" />
                                </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="lbl_notes" runat="server" CssClass="controlLabelFont" Text="Associate Notes"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:CheckBox ID="chk_associate_notes" runat="server" />
                                </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="lbl_documents" runat="server" CssClass="controlLabelFont" Text="Associate Documents"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:CheckBox ID="chk_associate_documents" runat="server" />
                                </td>
                        </tr>
                        <%-- Added by 'Imran Gani' (copied from RakaTech) on 05-Sep-2013 for Task & Alerts --%>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="lbl_task" runat="server" CssClass="controlLabelFont" Text="Associate Task"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:CheckBox ID="chk_associate_task" runat="server" />
                                </td>
                        </tr>
                        <%-- End of Task & Alerts --%>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:DropDownList ID="ddownerid" runat="server" CssClass='defaultFont' Font-Size="8pt" Visible="False">
                                </asp:DropDownList>
                                <asp:Label ID="lbl_enablenextstep" runat="server" Text="Enable Next Step?" CssClass="controlLabelFont"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                    <asp:CheckBox ID="chkenablenextstep" CssClass='defaultFont' Font-Size="8pt" runat="server" />
                                </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="lbl_enablerelatedinfo" runat="server" CssClass="controlLabelFont" Text="Enable Related Info?"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                            <asp:CheckBox ID="chkenablerelatedinfo" CssClass='defaultFont' Font-Size="8pt" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="1" rowspan="1">
                                <asp:Label ID="Label5" runat="server" CssClass="controlLabelFont" Text="Owner" Width="140px"></asp:Label>
                            </td>
                            <td colspan="1" rowspan="1">
                                <asp:TextBox ID="txt_owner_id" runat="server" CssClass="controlFont"></asp:TextBox>
                                <asp:HiddenField  ID="hf_owner_id" runat="server" Value="" />
                                <img id="imgOwnerSearch" runat="server" alt="Click here for Lookup Window" src="Images/search.gif" class="SearchPopup" onclick="javascript:openlookupwindow('pagewizard_hf_owner_id','pagewizard_txt_owner_id','f496930dfe0b690f','','');" />
                            </td>
                        </tr>
                    </table>
                    </asp:WizardStep>
                <asp:WizardStep ID="step2" runat="server" Title="Step2">
                        <table id="tbl_dyn_page" runat="server" style="width: 100%;">
                            <tr id="Tr1" runat="server">
                                <td colspan="3" id="Td1" runat="server">
                                    <asp:Label ID="Label2" runat="server" Font-Bold="True" CssClass='defaultFont' Font-Size="10pt"
                                        Text="Page creation wizard - Step 2"></asp:Label>
                                </td>
                            </tr>
                            <tr id="Tr5" runat="server">
                                <td colspan="3" id="Td4" runat="server">
                                    <table id="Table1" runat="server" style="width: 100%">
                                        <tr runat="server" id="Tr3">
                                    <td runat="server" align="left" colspan="1"  
                                        valign="top" id="Td3">
                                        <input id="tot_page" runat="server" type="hidden" value="1" style="width: 11px" />
                                        <input id="update_page" runat="server" type="hidden" style="width: 4px" />
                                        </td>
                                            <td runat="server" align="left" colspan="1" valign="top" id="Td5"><asp:ListBox ID="SelChildPage" runat="server" CssClass='defaultFont' Font-Size="8pt"
                                                    SelectionMode="Multiple" Width="77px" Height="1px" Visible="False"></asp:ListBox></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr id="Tr7" runat="server">
                                <td colspan="3" id="Td8" runat="server">
                                    <table id="tblDynamicGrid" style="width:100%;" runat="server">                           
                                    </table>
                                    <asp:Label ID="lblStatus2" runat="server" CssClass='defaultFont' Font-Size="X-Small"></asp:Label>
                                </td>
                            </tr>
                        </table>
                </asp:WizardStep>
                <asp:WizardStep ID="step3" runat="server" Title="Step3">
                    <asp:Label ID="lbl_step4" runat="server" Font-Bold="True" CssClass='defaultFont' Font-Size="10pt"
                        Text="Page creation wizard - Step 3"></asp:Label>
                    <table id="Table3" runat="server">                       
                        <tr id="Tr14" runat="server">
                            <td id="Td16" runat="server">
                                <asp:Label ID="Label112" runat="server" BorderStyle="None" CssClass='defaultFont' Font-Size="8pt"
                                    Height="22px" Text="Choose the master relationship that you want to be for the page: "></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table id="tblDynamicChild" runat="server" border="0" cellpadding="0" cellspacing="0" >                           
                        </table>
                        <table id="Table2" runat="server">
                        <tr id="Tr6" runat="server">
                            <td id="Td7" runat="server">
                                <asp:Label id="lblStatus3" runat="server" CssClass='defaultFont' Font-Size="X-Small"></asp:Label>
                            </td>
                        </tr>
                        </table> 
                </asp:WizardStep>
                <asp:WizardStep ID="step4" runat="server" Title="Step4">
                    <asp:Label ID="Label42" runat="server" Font-Bold="True" CssClass='defaultFont' Font-Size="10pt"
                        Text="Page creation wizard - Step 4"></asp:Label>
                    <br />
                    <table id="Table4" runat="server" border="0" cellpadding="0" cellspacing="0">                        
                        <tr id="Tr8" runat="server">
                            <td id="Td9" runat="server">
                                <asp:Label ID="Label12" runat="server" BorderStyle="None" CssClass='defaultFont' Font-Size="8pt"
                                    Height="22px" Text="Choose the page events that you want to be for the page: "></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table id="tblDynamicEvent" runat="server" border="0" cellpadding="0" cellspacing="0" enableviewstate="False" >                           
                        </table>
                        <table id="Table5" runat="server">
                        <tr id="Tr9" runat="server">
                            <td id="Td10" runat="server">
                                <asp:Label id="lblStatus4" runat="server" CssClass='defaultFont' Font-Size="X-Small"></asp:Label>
                            </td>
                        </tr>
                        </table> 
                </asp:WizardStep>
                <asp:WizardStep ID="Step5" runat="server" Title="Step5">
                 
                 <asp:Label ID="lblMode1" runat="server" Font-Bold="True" CssClass='defaultFont' Font-Size="10pt"
                        Text="Page creation wizard - Step 5"></asp:Label>
                    <br />
                 <table id="Table6"  border="0" cellpadding="0" cellspacing="0">
                        <tr id="Tr11" >
                            <td id="Td12" >
                                <asp:Label ID="lblMode3" runat="server" BorderStyle="None" CssClass='defaultFont' Font-Size="8pt"
                                    Height="22px" Text="Choose page view type "></asp:Label>
                            </td>
                        </tr>
                        <tr>
                        <td valign="bottom">
                                <asp:Label ID="Label14" runat="server" BorderStyle="None"
                                     Text="Page name"  CssClass="controlLabelFont"></asp:Label>
                           <asp:TextBox runat="server" ID="txtPageName" Enabled="false" CssClass='defaultFont' Font-Size="8pt"></asp:TextBox>
                        
                        </td>
                        
                        </tr>
                    </table>
                 <table id="tbldynamicPageMode"  border="0" cellpadding="0" cellspacing="0" enableviewstate="False" >                           
                      
                      <tr>
                      
                      <td colspan="2">
                      <fieldset>
                      <legend style="color:Black;border-color:Black;font-weight:bold;font-size:10pt;" class='defaultFont'>Group view</legend>
                     
                      <table>
                      <tr><td>
                      <asp:Label ID="Label11" runat="server" BorderStyle="None"
                                    Height="21px" Text="Enable Group view" Width="128px" CssClass="controlLabelFont"></asp:Label>
                      </td>
                      <td>
                      <asp:CheckBox ID="chkCategoryValue" runat="server" />
                      </td>
                      </tr>
                      
                      <tr>
                      <td>
                      <asp:Label ID="Label13" runat="server" BorderStyle="None"
                                    Height="21px" Text="Choose Group By" Width="128px" CssClass="controlLabelFont"></asp:Label>
                      </td>
                      <td>
                      <asp:DropDownList ID="ddlCategoryField" runat="server" CssClass='defaultFont' Font-Size="8pt" >
                                </asp:DropDownList>
                         <asp:HiddenField ID="hdnCategoryField" runat="server" />
                         <asp:HiddenField  ID="hdnCategoryFieldValue" runat="server" />     
                      </td>
                      
                      </tr>
                    
                      </table>
                      </fieldset>
                      <fieldset >
                      <legend class='defaultFont' style="color:Black;border-color:Black;font-weight:bold;font-size:10pt;">Tree view</legend>
                      
                      <table>
                       
                      
                      <tr >
                      <td >
                      <asp:Label ID="Label6" runat="server" BorderStyle="None"
                                    Height="21px" Text="Enable Tree view" Width="128px" CssClass="controlLabelFont"></asp:Label>
                      </td>
                      <td runat="server">
                       <asp:CheckBox ID="chkModeValue" runat="server" />
                       </td>
                       </tr> 
                       
                      
                       
                        <tr>
                      <td>
                      <asp:Label ID="Label7" runat="server" BorderStyle="None"
                                    Height="21px" Text="Choose Parent Field" Width="128px" CssClass="controlLabelFont"></asp:Label>
                      </td>
                      <td  >
                         <asp:DropDownList ID="ddlParentField" runat="server" CssClass='defaultFont' Font-Size="8pt" >
                                </asp:DropDownList>
                         <asp:HiddenField ID="hdnParentField" runat="server" />
                         <asp:HiddenField ID="hdnParentFieldValue" runat="server" />
                                
                       </td>
                       </tr> 
                       
                        <tr runat="server">
                      <td runat="server">
                      <asp:Label ID="Label10" runat="server" BorderStyle="None"
                                    Height="21px" Text="Choose Child Field" Width="128px" CssClass="controlLabelFont"></asp:Label>
                      </td>
                      <td  runat="server">
                         <asp:DropDownList ID="ddlChildField" runat="server" CssClass='defaultFont' Font-Size="8pt" >
                                </asp:DropDownList>
                         <asp:HiddenField ID="hdnChildField" runat="server" />
                         <asp:HiddenField ID="hdnChildFieldValue" runat="server" />       
                         
                       </td>
                       </tr> 
                      
                        </table>
                        </fieldset>

                        <fieldset>
                            <legend style="color:Black;border-color:Black;font-weight:bold;font-family:Arial;font-size:10pt;">Datasheet view</legend>
                                <table>
                                    <tr>
                                        <td>
                                        <asp:Label ID="Label16" runat="server" BorderStyle="None" Height="21px" Text="Enable Datasheet view" Width="128px" CssClass="controlLabelFont"></asp:Label>
                                        </td>
                                        <td><asp:CheckBox ID="ChkDatasheet" runat="server" /></td>
                                    </tr>
                      
                  <%--<tr>
                  <td>
                  <asp:Label ID="Label17" runat="server" BorderStyle="None"
                                Height="21px" Text="Choose Filter By" Width="128px" CssClass="controlLabelFont"></asp:Label>
                  </td>
                  <td>
                  <asp:DropDownList ID="ddlFilterBy" runat="server" Font-Names="Arial" Font-Size="8pt" >
                            </asp:DropDownList>
                     <asp:HiddenField ID="hdnddlFilterBy" runat="server" />
                     <asp:HiddenField  ID="hsnddlFilterByValue" runat="server" />     
                  </td>
                  
                  </tr>--%>
                    
                                </table> 
                            </fieldset>
                        </td>
                      </tr>
                       <tr id="Tr2" runat="server">
                            <td id="Td2" runat="server" colspan="2">
                                <asp:Label id="lblStatus5" runat="server" CssClass='defaultFont' Font-Size="X-Small"></asp:Label>
                            </td>
                        </tr>
                      </table>
                </asp:WizardStep>
                
            </WizardSteps>
            <HeaderStyle Height="25px" CssClass="pgForm_title" HorizontalAlign="Left" />
            <NavigationStyle CssClass="displaygridbottom" Height="30px" />
            <SideBarTemplate>
                <asp:DataList ID="SideBarList" runat="server">
                    <ItemTemplate>
                        <asp:LinkButton ID="SideBarButton" runat="server"></asp:LinkButton>
                    </ItemTemplate>
                    <SelectedItemStyle Font-Bold="True" />
                </asp:DataList>
            </SideBarTemplate>
            <StartNavigationTemplate>
                <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
                <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="Cancel" />
            </StartNavigationTemplate>
            <FinishNavigationTemplate>
                <asp:Button ID="FinishPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                    Text="Previous" />
                <asp:Button ID="FinishButton" runat="server" CommandName="MoveComplete" Text="Finish" OnClientClick='javascript:showSave(true);' />
                <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="Cancel" />
            </FinishNavigationTemplate>
            <StepNavigationTemplate>
                &nbsp;
                <asp:Button ID="StepPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                    Text="Previous" OnClientClick="javascript:Clear_Del_Count();" />
                <asp:Button ID="StepNextButton" runat="server" CommandName="MoveNext" Text="Next" OnClientClick='javascript:Clear_Del_Count();' />
                <asp:Button ID="FinishButton" runat="server" Text="Finish" OnClick="FinishButton_Click" OnClientClick='javascript:showSave(true);' />
                <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="Cancel" />
            </StepNavigationTemplate>
            <StepStyle VerticalAlign="Top" />
        </asp:Wizard>
    </div>    
    <div id="Panel1" style="background-color:#EAEAEA;border-width:1px;border-style:solid;border-color:Gray;padding:3px;display:none;position:absolute;filter:alpha(opacity=70);opacity:0.7;"></div>
        <div id = "div_cont"  style="display:none;padding: 10px 6px 20px 6px;z-index: 2;width: 648px; padding: 10px;position:absolute; top:-87px; left:136px; height: auto;filter:alpha(opacity=100);opacity:1;"  class="WizardDiv">
            <table width="100%">
            <tr>
            <td class="Grid_header" style="height:25px;">Control Details
            <input type="hidden" id="hdfDynamicGridId" value="" runat="server"/>
            </td>
            </tr>
            </table>
            <table id = "div_tbl_cont" runat="server" style =" font-size:11px;" class='defaultFont' border="0" >
            </table>
            <table id = "div_tbl_adv" runat="server" style =" font-size:11px;" class='defaultFont' border="0" width="100%">
                <tr>
                    <td align="left" colspan="4" style="height: 13px;border-bottom:solid 1px #A0A0A0;">
                        <b>Advanced Options </b>
                    </td>
                </tr>
                <tr>
                    <td align="left" colspan="4" style="height: 6px;">
                    </td>
                </tr>
            </table>
            <table id = "div_tbl" runat="server" style =" width:100%; font-size:11px;" class='defaultFont' border="0" >
                <tr>
                    <td style="width:70%;">
                        <asp:Label ID="lblCtrMsg" runat="server" EnableViewState="False" CssClass='defaultFont' Font-Size="9pt" ForeColor="Red" />
                    </td>
                    <td align="right">
                        <asp:Button ID="imgbtn_save" Width="45px" runat="server" Text="Save" OnClick="imgbtn_save_Click" OnClientClick="javascript:return savecontrol(true);" />
                        <asp:Button ID="imgbtn_update" runat="server" Text="Update" OnClientClick="javascript:return savecontrol(false);" OnClick="imgbtn_update_Click"/>
                        <input id="imgbtn_cancel" type="button" value="Cancel" onclick="CancelValue()"/>
                    </td>
                </tr>
            </table>
        </div>
      <script language="javascript" type="text/javascript">
    
        fillCombo();
        
      </script>
</asp:Content>

